package com.ttg.web.service.job;

import com.ttg.common.dto.TaskAcctDTO;
import com.ttg.common.dto.TaskBaseDTO;
import com.ttg.common.dto.TaskCostGradingDTO;
import com.ttg.common.entities.RattingTask;
import com.ttg.common.enums.TaskEnum;
import com.ttg.common.vo.TaskResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * Description：成本管理任务入口
 * Author: chenyou
 * Date: 2025/9/25 13:48
 * Company: ttg
 * Copyright: Copyright (c) 2025
 */
@Component
public class CostManageJobService {

    @Autowired
    private IndustryDepositJobService industryDepositJobService;
    @Autowired
    private MerchDepositJobService merchDepositJobService;
    @Autowired
    private AcctDepositAnalysisJobService depositAnalysisJobService;
    @Autowired
    private AcctComprehensiveAnalysisJobService comprehensiveAnalysisJobService;
    @Autowired
    private CostGradingJobService costGradingJobService;

    @RattingTask(taskEnum = TaskEnum.CM_INDUSTRY_DEPOSIT_BY_YEAR)
    public TaskResultVO industryDepositByYear(TaskBaseDTO reqDto){
        return industryDepositJobService.industryDeposit(reqDto);
    }

    @RattingTask(taskEnum = TaskEnum.CM_INDUSTRY_DEPOSIT_BY_MONTH)
    public TaskResultVO industryDepositByMonth(TaskBaseDTO reqDto){
        return industryDepositJobService.industryDeposit(reqDto);
    }

    @RattingTask(taskEnum = TaskEnum.CM_MERCH_DEPOSIT_BY_YEAR)
    public TaskResultVO merchDepositByYear(TaskBaseDTO reqDto){
        return merchDepositJobService.merchDeposit(reqDto);
    }

    @RattingTask(taskEnum = TaskEnum.CM_MERCH_DEPOSIT_BY_MONTH)
    public TaskResultVO merchDepositByMonth(TaskBaseDTO reqDto){
        return merchDepositJobService.merchDeposit(reqDto);
    }

    @RattingTask(taskEnum = TaskEnum.CM_ACCT_DEPOSIT_ANALYSIS_BY_YEAR)
    public TaskResultVO acctDepositAnalysisByYear(TaskAcctDTO reqDto){
        return depositAnalysisJobService.acctDepositAnalysis(reqDto);
    }

    @RattingTask(taskEnum = TaskEnum.CM_ACCT_DEPOSIT_ANALYSIS_BY_MONTH)
    public TaskResultVO acctDepositAnalysisByMonth(TaskAcctDTO reqDto){
        return depositAnalysisJobService.acctDepositAnalysis(reqDto);
    }

    @RattingTask(taskEnum = TaskEnum.CM_ACCT_COMPREHENSIVE_ANALYSIS_BY_YEAR)
    public TaskResultVO acctComprehensiveAnalysisByYear(TaskAcctDTO reqDto){
        return comprehensiveAnalysisJobService.acctComprehensiveAnalysis(reqDto);
    }

    @RattingTask(taskEnum = TaskEnum.CM_ACCT_COMPREHENSIVE_ANALYSIS_BY_MONTH)
    public TaskResultVO acctComprehensiveAnalysisByMonth(TaskAcctDTO reqDto){
        return comprehensiveAnalysisJobService.acctComprehensiveAnalysis(reqDto);
    }

    @RattingTask(taskEnum = TaskEnum.CM_COST_GRADING)
    public TaskResultVO costGrading(TaskCostGradingDTO reqDto){
        return costGradingJobService.costGrading(reqDto);
    }
}
